package com.wf.smartcomm.server.bean;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.google.gson.annotations.Expose;

@Entity
@Table(name = "t_terminal")
public class Terminal {
	@Expose
	@Id
	@Column(length = 32)
	private String objectId;
	
	@Expose
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="merchantId")
	private Merchant merchant;
	
	@Expose
	@Column(length = 32)
	private String token;
	
	@Expose
	@Column
	private BigDecimal totalScore = BigDecimal.ZERO;
	
	@Expose
	@Column
	private BigDecimal totalAmount = BigDecimal.ZERO;
	
	@Expose
	@Column
	private BigDecimal scale = BigDecimal.ONE;
	
	@Expose
	@Column
	private Integer type;
	
	@Expose
	@Column
	private Integer status;
	
	@Expose
	@Column
	private Integer online;
	
	@Expose
	@Column(length = 16)
	private String pushId;
	
	@Expose
	@Column
	private Date createdAt;

	public String getObjectId() {
		return objectId;
	}

	public void setObjectId(String objectId) {
		this.objectId = objectId;
	}

	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public BigDecimal getTotalScore() {
		return totalScore;
	}

	public void setTotalScore(BigDecimal totalScore) {
		this.totalScore = totalScore;
	}

	public BigDecimal getTotalAmount() {
		return totalAmount;
	}

	public void setTotalAmount(BigDecimal totalAmount) {
		this.totalAmount = totalAmount;
	}

	public BigDecimal getScale() {
		return scale;
	}

	public void setScale(BigDecimal scale) {
		this.scale = scale;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getOnline() {
		return online;
	}

	public void setOnline(Integer online) {
		this.online = online;
	}

	public String getPushId() {
		return pushId;
	}

	public void setPushId(String pushId) {
		this.pushId = pushId;
	}
}
